package me.szlx.thing.bundle;

import me.szlx.thing.Thing;

import java.util.ArrayList;
import java.util.List;

public class SimpleThingBundle<T extends Thing> implements ThingBundle<T> {
    private List<T> thingList;

    public SimpleThingBundle(List<T> thingList) {
        setThingList(thingList);
    }

    @Override
    public List<T> getAll() {
        return thingList;
    }

    public void setThingList(List<T> thingList) {
        this.thingList = thingList != null ? thingList : new ArrayList<>();
    }
}
